//
//  MAStaffInfoController.m
//  meiang_edu
//
//  Created by hfcb on 2018/9/11.
//  Copyright © 2018年 com.meiang.meiang_edu. All rights reserved.
//

#import "MAStaffInfoController.h"
#import "MAStaffModel.h"

@interface MAStaffInfoController ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UIImageView *bgIcon;
@property (weak, nonatomic) IBOutlet UILabel *usernameLabel;
@property (weak, nonatomic) IBOutlet UILabel *sexLabel;
@property (weak, nonatomic) IBOutlet UILabel *phoneLabel;
@property (weak, nonatomic) IBOutlet UILabel *relationshipLabel;
@property (weak, nonatomic) IBOutlet UILabel *remarkLabel;
@property (weak, nonatomic) IBOutlet UIImageView *sexIcon;
@property (weak, nonatomic) IBOutlet UILabel *fourthKeyLabel;

@end

@implementation MAStaffInfoController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupBasic];
    [self setupTableView];
    self.fourthKeyLabel.text = @"角色";
    
    [self wr_setNavBarBackgroundAlpha:0];
}

- (void)setupBasic {
    [self.bgIcon sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",IMG_OSS,self.staffModel.cbackground]] placeholderImage:[UIImage imageNamed:@""]];
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",IMG_OSS,self.staffModel.ps_id]] placeholderImage:[UIImage imageNamed:@"homepage_navigationbar_picture"]];
    self.nameLabel.text = self.staffModel.cname;
    self.sexIcon.image = [self.staffModel.cgender isEqualToString:@"男"] ? [UIImage imageNamed:@"mansymbol_logo"] : [UIImage imageNamed:@"womansymbol_logo"];
    self.usernameLabel.text = self.staffModel.cname;
    self.sexLabel.text = self.staffModel.cgender;
//    self.phoneLabel.text = self.staffModel.
    self.relationshipLabel.text = self.staffModel.ustype;
//    self.remarkLabel.text =
}

- (void)setupTableView {
    
    self.tableView.tableFooterView = [UIView new];
    self.tableView.backgroundColor = PROJECT_LIGHT_GRAY_COLOR;
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.tableView.contentInset = UIEdgeInsetsMake(-64, 0, 0, 0);
}


- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self hiddenTabbar:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
